Two basic types of encoders or transducers are used to convert angular motion of a shaft or axle into a signal: quadrature encoders and sinusoidal encoders. These encoders use two sensors placed ninety electrical degrees apart to provide two quadrature signals A and B and an optional third sensor that provides an output reference once every turn. Directional information is encoded in the phase relationship between the signal pair; with input A either leading or lagging input B by 90 degrees. There are typically a few thousand electrical cycles for each rotation of the shaft.
A quadrature encoder delivers a pair of digital signals (A and B, which can be a logical 1 or 0) that change state with input position. Relative position measurements are obtained by counting the number of edges; the accumulated count being incremented or decremented according to direction of movement. Sinusoidal encoders provide two analog signals that offer much higher position and speed resolution. The hardware or software techniques used to interface to the encoders can have a measurable impact on the achieved position resolution and accuracy. A quadrature phase relationship is always maintained between signals A and B, so simultaneous change of both inputs is an illegal condition and generally indicates an issue with the encoder or wiring.
A decoding device must be capable of detecting both the phase relationship between A and B, which identifies the direction of motion, and illegal edge transitions. Hardware implementations to identify these relationships can be quite efficient; software implementations are often slow. Improvements are needed.